<!--
 * @Description: 加载SVG图片的组件
 * @Version: 1.0
 * @Date: 2023-07-27 14:15:57
 * @LastEditTime: 2023-07-28 09:56:52
-->
<template>
    <svg :class="svgid" v-bind="$attrs">
        <use :xlink:href="svgName"></use>
    </svg>
</template>
<script setup lang="ts">
import { computed } from 'vue'
const props = defineProps({
    name: {
        type: String,
        required: true
    },
})
const svgName = computed(() => `#svg-${props.name}`)
const svgid = computed(() => {
    if (props.name) return `svg-load svg-${props.name}`
    return 'svg-load'
})
</script>
<style scoped>
/* .svg-load {
    width: 80em;
    height: 50em;
    fill: currentColor;
    vertical-align: middle;
} */
</style>